
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:c="http://java.sun.com/jstl/core">

<ui:composition template="../templates/template.xhtml">

	<ui:define name="title">
	 	User Profile
	</ui:define>

	<ui:param name="page" value="userProfile" />
	<ui:param name="profile" value="viewProfile" />

	<ui:define name="header">
		<ui:include src="/secure/header.xhtml" />
	</ui:define>

	<ui:define name="menu">
			Insert Meun...
		
	</ui:define>

	<ui:define name="body">
		<h:form>
			<br />
			<ul id="tabmenu">
				<!--  <li><a class="active" href="tab1.html">View</a></li> -->

				<c:forEach var="link" items="#{userProfile.menu}">
					<c:choose>
						<c:when test="#{link.navigationRule == profile}">
							<li><h:commandLink styleClass="active" value="#{link.text}"
								action="#{link.doNavigation}" /></li>
						</c:when>
						<c:otherwise>
							<li><h:commandLink value="#{link.text}"
								action="#{link.doNavigation}" /></li>
						</c:otherwise>
					</c:choose>
				</c:forEach>
			</ul>			

			<div id="content"><h:panelGrid columns="2" width="100%">
				<h:column>
					<h:panelGrid id="person" styleClass="iTunes" columns="2"
						width="70%">
						<f:facet name="header">
							<h:outputText id="userDetails" value="User Details" />
						</f:facet>
						<h:column>
							<h:outputText id="userID" value="User ID: " />
						</h:column>
						<h:column>
							#{person.userId}
						</h:column>
						<h:column>
							<h:outputText id="firstName" value="First Name: " />
						</h:column>
						<h:column>
							#{person.firstName}
						</h:column>
						<h:column>
							<h:outputText id="lastName" value="Last Name: " />
						</h:column>
						<h:column>
							#{person.lastName}
						</h:column>
						<h:column>
							<h:outputText value="Email Address : " />
						</h:column>
						<h:column>
							#{person.profile.email}
				
						</h:column>
						<h:column>
							<h:outputText id="organizations" value="Organization(s): " />
						</h:column>
						<h:column>
							<h:dataTable id="person1" value="#{person.organizations}"
								var="rowVar2" headerClass="HEADING" rowClasses="ROW1,ROW2"
								width="40%">
								<h:column>
									<h:outputText value="#{rowVar2.organization.name}" />
								</h:column>
							</h:dataTable>
						</h:column>
						<h:column>
							<h:outputText value="Role(s): " />
						</h:column>
						<h:column>
							<h:dataTable id="roles" value="#{person.roles}" var="rolesVar"
								headerClass="HEADING" rowClasses="ROW1,ROW2" width="40%">
								<h:column>
									<h:outputText value="#{rolesVar.role}" />
								</h:column>
							</h:dataTable>
						</h:column>
					
					</h:panelGrid>
				</h:column>	
				<h:column>
				</h:column>
					<h:column>
						<h:commandLink action="#{deleteUser.deleteUser}" value="Delete User" /> 
					</h:column>		
				
					</h:panelGrid>
					
					</div>
				
	


		</h:form>
	</ui:define>

</ui:composition>

</html>
